package com.example.apigateway;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.cloud.netflix.zuul.filters.ZuulProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Component;

/**
 * @description:
 * @author: sanjin
 * @date: 2019/6/15 16:44
 */
@Configuration
public class ZullConfig {

    @Bean
    @Primary
    @ConfigurationProperties("zuul")
    @RefreshScope
    ZuulProperties zuulProperties() {
        return new ZuulProperties();
    }
}
